﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


class MaximalIncreasingSequence
{
    static void Main()
    {
        int[] arr = { 4, 1, 2, 3, 4, 3, 2, 2, 1 };
        int index = 0;
        int count = 1;
        int maxCount = 1;
        for (int i = 0; i < arr.Length - 1; i++)
        {
            if (arr[i + 1] > arr[i])
            {
                count++;
                if (count > maxCount)
                {
                    maxCount = count;
                    index = i - count + 2;
                }
            }

            else
            {
                count = 1;
            }
        }

        for (int i = index; i < maxCount + index - 1; i++)
        {
            Console.Write(arr[i] + ", ");
        }
        Console.WriteLine(arr[maxCount + index - 1]);
    }
}

